home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 3 / Cream of the Crop 3.iso / compress / arcid104.zip / PCBTEST.BAT < prev    next >
DOS Batch File  |  1993-12-04  |  2KB  |  119 lines

  1. @Echo off
  2. cls
  3.  
  4. if exist pcbpass.txt del pcbpass.txt
  5. if exist pcbfail.txt del pcbfail.txt
  6.  
  7. ARCID %1 ARC ARJ HYP LZH PAK SQZ ZIP ZOO GIF
  8. if errorlevel 98 goto UNKNOWN
  9. if errorlevel 9  goto GIF_TESTING
  10. if errorlevel 8  goto ZOO_TESTING
  11. if errorlevel 7  goto ZIP_TESTING
  12. if errorlevel 6  goto SQZ_TESTING
  13. if errorlevel 5  goto PAK_TESTING
  14. if errorlevel 4  goto LZH_TESTING
  15. if errorlevel 3  goto HYP_TESTING
  16. if errorlevel 2  goto ARJ_TESTING
  17. if errorlevel 1  goto ARC_TESTING
  18.  
  19. Echo ERROR: ARCID critical error...please notify sysop! > pcbfail.txt
  20. exit
  21.  
  22. :UNKNOWN
  23. Echo ERROR: Unknown file format! > pcbfail.txt
  24. exit
  25.  
  26. :ARC_TESTING
  27. md testing
  28. cd testing
  29. pkunpak -r %1
  30. if not errorlevel 0 goto ERROR1
  31. scan /a /nomem /nopause *.*
  32. if not errorlevel 0 goto ERROR2
  33. goto OK
  34.  
  35. :ARJ_TESTING
  36. md testing
  37. cd testing
  38. arj e -y %1
  39. if not errorlevel 0 goto ERROR1
  40. scan /a /nomem /nopause *.*
  41. if not errorlevel 0 goto ERROR2
  42. goto OK
  43.  
  44. :HYP_TESTING
  45. md testing
  46. cd testing
  47. hyper -x %1
  48. if not errorlevel 0 goto ERROR1
  49. scan /a /nomem /nopause *.*
  50. if not errorlevel 0 goto ERROR2
  51. goto OK
  52.  
  53. :LZH_TESTING
  54. md testing
  55. cd testing
  56. lha e /m1 %1
  57. if not errorlevel 0 goto ERROR1
  58. scan /a /nomem /nopause *.*
  59. if not errorlevel 0 goto ERROR2
  60. goto OK
  61.  
  62. :PAK_TESTING
  63. md testing
  64. cd testing
  65. pak e /wa %1
  66. if not errorlevel 0 goto ERROR1
  67. scan /a /nomem /nopause *.*
  68. if not errorlevel 0 goto ERROR2
  69. goto OK
  70.  
  71. :ZIP_TESTING
  72. md testing
  73. cd testing
  74. pkunzip -o %1
  75. if not errorlevel 0 goto ERROR1
  76. scan /a /nomem /nopause *.*
  77. if not errorlevel 0 goto ERROR2
  78. goto OK
  79.  
  80. :SQZ_TESTING
  81. md testing
  82. cd testing
  83. sqz e %1
  84. if not errorlevel 0 goto ERROR1
  85. scan /a /nomem /nopause *.*
  86. if not errorlevel 0 goto ERROR2
  87. goto OK
  88.  
  89. :ZOO_TESTING
  90. md testing
  91. cd testing
  92. zoo e %1
  93. if not errorlevel 0 goto ERROR1
  94. scan /a /nomem /nopause *.*
  95. if not errorlevel 0 goto ERROR2
  96. goto OK
  97.  
  98. :GIF_TESTING
  99. giftest /b:0 %1
  100. if not errorlevel 0 goto ERROR1
  101.  
  102. :OK
  103. cd ..
  104. echo y|del testing\*.*
  105. rd testing
  106. Echo File passed all tests... > pcbpass.txt
  107. exit
  108.  
  109. :ERROR1
  110. echo y|del testing\*.*
  111. rd testing
  112. Echo ERROR: File failed integrity test... > pcbfail.txt
  113. exit
  114.  
  115. :ERROR2
  116. echo y|del testing\*.*
  117. rd testing
  118. Echo ERROR: File failed virus test... > pcbfail.txt
  119.